<script>
	function optionsFormatter(value, row) {

		return  '<div class="btn-group">'+
			'<a href="/${params.module}/${params.controller}/edit/'+value+'" class="btn btn-xs btn-primary"><i class="fa fa-fw fa-pencil"></i>'+"&{params.module+'.'+params.controller+'.all.table.button.edit'}"+'</a>'+
			'<button class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown">'+
				'<span class="caret"></span>'+
			'</button>'+
			'<ul class="dropdown-menu">'+
				'<li><a href="/${params.module}/${params.controller}/delete/'+value+'" ><i class="fa fa-fw fa-trash-o"></i>'+"&{params.module+'.'+params.controller+'.all.table.button.delete'}"+'</a></li>'+
			'</ul>'+
		'</div>';
	}
</script>

<section id="widget-grid" class="">
	<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
		<div class="jarviswidget jarviswidget-color-blueDark" id="wid-id-0" data-widget-editbutton="false">

			<header>
				<span class="widget-icon"> <i class="fa fa-table"></i> </span>
				<h2>&{params.module+'.'+params.controller+'.all.page.title'}</h2>
			</header>

			<div>
				<div class="widget-body" >
					<div class="table-responsive">
						<table class="table table-condensed table-bordered"
							data-toggle="table"
							data-url="${_listURL}"
							data-side-pagination="server"
							data-pagination="true"
							data-page-list="#{list items:_pageSizeList, as:'page'}${page}#{if !page_isLast},#{/if}#{/list}"
							data-page-size="${_defaultPageSize}"
							data-sort-name="${_defaultSortName}"
							data-sort-order="${_defaultSortOrder}"
							data-search="${_isSearchable}">
							<thead>
								<tr>
									#{list items:_fields, as:'field'}
										<th data-field="${field.name}" data-sortable="${field.isSortable}">&{field.tableHeaderLabel}</th>
									#{/list}
									<th data-field="id" data-align="center" data-width="200" data-formatter="optionsFormatter">&{'template.general.table.header.options'}</th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
			</div>
		</div>
	</article>
</section>